package com.netease.nimlib.ipc.cp.provider;

import android.content.Context;

import com.netease.nimlib.ipc.cp.data.IDataHandler;
import com.netease.nimlib.ipc.cp.data.PreferenceDataHandler;

/**
 * 基于SharedPreference的数据源提供者&数据业务处理器封装类
 * <p>
 * Created by huangjun on 2017/10/31.
 **/

public class PreferenceContentProvider extends AbsContentProvider {

    @Override
    public IDataHandler onGetDataHandler(Context context, final String name) {
        return new PreferenceDataHandler(context, name) {
            @Override
            public void onHandleVoid(final String key, final String value) {
                onHandleData(name, key, value);
            }
        };
    }

    protected void onHandleData(final String name, final String key, final String value) {
    }
}